Ext.ns("Ext.ux.menu");

Ext.ux.menu.DatetimeItem = function(config){
    Ext.ux.menu.DatetimeItem.superclass.constructor.call(this, new Ext.ux.DatetimePicker(config), config);
    /** The Ext.DatePicker object @type Ext.DatePicker */
    this.picker = this.component;
    this.addEvents('select');
    
    this.picker.on("render", function(picker){
        picker.getEl().swallowEvent("click");
        picker.container.addClass("x-menu-date-item");
    });

    this.picker.on("select", this.onSelect, this); 
};
Ext.extend(Ext.ux.menu.DatetimeItem, Ext.menu.Adapter, { 
    // private
    onSelect : function(picker, date){
        this.fireEvent("select", this, date, picker);
        Ext.ux.menu.DatetimeItem.superclass.handleClick.call(this);
    }
});